package com.dtf.core.common.vo;

import java.util.List;

public class Pagination {
	//数据页数
	private int pageIndex;
	//每页多少条数据
	private int pageSize;
	
	//数据库有多少条数据
	private int totalRows;
	//根据计算一共有多少页数据
	private int totalPages;
	
	//当前一页的数据
	private List list;

	public int getPageIndex() {
		return pageIndex;
	}

	public void setPageIndex(int pageIndex) {
		this.pageIndex = pageIndex;
	}

	public int getPageSize() {
		return pageSize;
	}

	public void setPageSize(int pageSize) {
		this.pageSize = pageSize;
	}

	public int getTotalRows() {
		return totalRows;
	}

	public void setTotalRows(int totalRows) {
		this.totalPages = totalRows/pageSize;
		this.totalPages = totalRows%pageSize == 0 ?totalPages:totalPages+1;
		this.totalRows = totalRows;
	}

	public int getTotalPages() {
		return totalPages;
	}

	public void setTotalPages(int totalPages) {
		this.totalPages = totalPages;
	}

	public List getList() {
		return list;
	}

	public void setList(List list) {
		this.list = list;
	}
	
	
}
